package com.yugao.fintech.antelope.system.model.mq;

import com.yugao.fintech.antelope.base.model.module.mq.AbstractMQ;
import com.yugao.fintech.antelope.base.model.module.mq.BaseMqPayload;

/**
 * 定义MQ消息格式
 * 业务场景： 删除租户
 *

 */
@Getter
@Setter
public class TenantDeleteMQ extends AbstractMQ {
    public static final String QUEUE = "tenant.delete";
    public static final String EXCHANGE = "system.tenant.delete";
    public static final String KEY = "";

    public TenantDeleteMQ(MsgPayload msgPayload) {
        super(msgPayload);
    }

    /**
     * 定义Msg消息载体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class MsgPayload extends BaseMqPayload {

        public MsgPayload(Long tenantId) {
            super();
            this.tenantId = tenantId;
        }
    }

    public static TenantDeleteMQ build(Long tenantId) {
        return new TenantDeleteMQ(new MsgPayload(tenantId));
    }
}
